package com.kaoshi.myweb.webstruts.controller;

import org.springframework.stereotype.Component;

import com.kaoshi.myweb.common.seachable.QueryCondition;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 采用开涛项目的方式动态生成前台查询sql
 * @author Administrator
 *
 */
public class SearchbleAction extends BaseAction {

	private String sql;
	
	public String searchInput() {
		return SUCCESS;
	}
	
	public String search() throws Exception {
		QueryCondition queryCondition = mapToCondition();
		sql = queryCondition.toSQLString();
		return SUCCESS;
	}

	
	public String getSql() {
		return sql;
	}

	public void setSql(String sql) {
		this.sql = sql;
	}
	
}
